import Vue from 'vue'

const apiUrl = 'api/'

export default {
  all () {
    return Vue.http.get(apiUrl + 'right')
  },
  save (right) {
    if (right.pkid) {
      return Vue.http.put(apiUrl + 'right', right)
    } else {
      return Vue.http.post(apiUrl + 'right', right)
    }
  },
  delete (pkid) {
    return Vue.http.delete(apiUrl + 'right/' + pkid)
  }
}

